package ru.cod.rs.types;

import ru.cod.rs.enums.Actions;

public class Speed {
	
	private int xv=1;
	private int yv=0;
	private Actions xDir=Actions.Right;
	
	public Speed() {
		xv=1;
	}
	
	public Speed(int xv) {
		this.xv=xv;
	}
	
	public void toggleDir() {
		if(Actions.Right.equals(xDir)) {
			xDir=Actions.Left;
		} else {
			xDir=Actions.Right;
			}
	}
	
	
	
	
	////////////////////////////////
	public int getXv() {
		return xv;
	}
		
	public int getXdir() {
		return xv;
	}
	public void setXv(int xs) {
		xv=xs;
	}
		
	public void setXdir(Actions act) {
		xDir=act;
	}
	
	
}
